﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Top.Data;

namespace Top.PointStore.Business
{
    public class AdminManager
    {
        /// <summary>
        /// 判断CRM账号是否存在
        /// </summary>
        /// <param name="brokerKid"></param>
        /// <returns></returns>
        public static async Task<int> IsExists(int adminKid)
        {
            if (adminKid <= 0) return -1;
            const string sql = "select count(1) from S_Admin where Kid={0}";
            using (var db = new DbTour())
            {
                return await db.Sql(sql, adminKid).ExecuteScalar<int>(0);
            }
        }
    }
}
